<?php

class Public_Post_CommentsAction extends BlogPublicBaseAction
{
    /*
    public function isSimple()
    {
        return true;
    }
	*/
    public function executeRead(AgaviRequestDataHolder $rd)
    {
        $params = $rd->getParameters();
        /* @var $user BlogUser */
        $user = $this->getContext()->getUser();
        /* @var $model Public_PostsModel */
        $model = $this->getContext()->getModel('Posts', 'Public');
        
        $date = date_create(sprintf('%s-%s-%s', $params['year'], $params['month'], $params['day']));
        $post = $model->getPost(null, $params['shortcut'], $date);
        
        $this->setAttribute('post', $post);
        
        return 'Success';
    }
    
	/**
	 * Returns the default view if the action does not serve the request
	 * method used.
	 *
	 * @return     mixed <ul>
	 *                     <li>A string containing the view name associated
	 *                     with this action; or</li>
	 *                     <li>An array with two indices: the parent module
	 *                     of the view to be executed and the view to be
	 *                     executed.</li>
	 *                   </ul>
	 */
	public function getDefaultViewName()
	{
		return 'Success';
	}
}

?>